Ruby Under a Microscope by Pat Shaughnessy

Ruby Under a Microscope by Pat Shaughnessy

Author:Pat Shaughnessy
Language: eng
Format: mobi, pdf
Published: 2012-10-29T04:00:00+00:00


Just like JRuby, Rubinius has a command line option that allows you to see the VM instructions your code is compiled into:

$ cat simple.rb puts 2+2 $ rbx compile simple.rb -B

============= :__script__ ============== Arguments: 0 required, 0 post, 0 total Arity: 0 Locals: 0 Stack size: 3 Lines to IP: 1: 0..11 0000: push_self 0001: meta_push_2 0002: meta_push_2 0003: meta_send_op_plus :+ 0005: allow_private 0006: send_stack :puts, 1 0009: pop 0010: push_true 0011: ret ----------------------------------------



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.